﻿#include "hnstring.h"
#include <sstream>
#include <iomanip>

std::string floatToStringWithTwoDecimalPlaces(float value, size_t pre)
{
    std::ostringstream streamObj;
    // Set Fixed -Point Notation
    streamObj << std::fixed;
    // Set precision to 2 digits
    streamObj << std::setprecision(pre);
    //Add double to stream
    streamObj << value;
    // Get string from output string stream
    return streamObj.str();
}

